package be.novelfaces.component.input;

import java.io.IOException;

import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;

import org.richfaces.cdk.annotations.JsfRenderer;

import be.novelfaces.component.util.element.InputWriter;

//TODO create AbstractInputRenderer for logging and ...

@JsfRenderer(family = "be.novelfaces.component", //
type = "be.novelfaces.component.InputTextRenderer")
public class InputTextRenderer extends AbstractInputRenderer {

	@Override
	public void encodeEnd(FacesContext facesContext, UIComponent component)
			throws IOException {
		InputWriter.getInstance().startElement(component)
				.getAttributesWriterBuilder(component)
				.withAllAttributesForInputText().writeAttributes().endElement();
	}
}
